package model;

public class Test {
	public static void main(String[] args) {
		MyRunable r = new MyRunable();
		
		Thread t = new Thread(r);
		Thread t2 = new Thread(r);
		Thread t3 = new Thread(r);
		Thread t4 = new Thread(r);
		
		t.start();
		t2.start();
		t3.start();
		t4.start();
		
		System.out.println("Thread is alive: " + t.isAlive());
		
		while(t.isAlive()) {
			try {
				t.join();
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
		
		System.out.println("Thread is alive: " + t.isAlive());
	}

}
